home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
cli
/
0utils.lha
/
0Utils
/
SMakefile
< prev
next >
Wrap
Makefile
|
1995-09-05
|
7KB
|
327 lines
TEMP = \#?.o \#?.lnk \#?.p #\#?.c
DESTDIR = SHARE:C/
ARCDIR = 0Filters/
#
# WARNING: for this directory #?.c are TEMP files!
#
########################################################
#
# How to create the 'std' Targets:
#
# all - build anything, that can be built
# clean - erase all tempfiles
# erase - erase all built files
# doc - only all docs
# csrc - only the C sources
#
all : bin doc clean
# This hack was needed for sc 6.51 in the time between 10.10. and 1.1.
#AMIGADATE = `rx "say '""('translate(date(E),'.','/')')""'"`
BIN =
CSRC =
DATA =
DOC =
########################################################
#
# The following crap is for SMake has no
# grouping, so we have to build a seperate
# dependancy for each file and its .c file
#
# For DMake we would just say:
# m> $(BIN) : $(BIN:"*":"*.c")
#
# with XDME we do:
__createdependencies:
ping 2 top find (BIN =) down ping 1 pong 2 5 down ping 2 2 insline
pong 1 while !r )firstnb set xx $currentword down ping 1 pong 2 insert (DOC = \$(DOC) $xx.doc^nCSRC = \$(CSRC) $xx.c^n$xx.doc : $xx.data^n^n$xx : $xx.c^n \$(CC) \$(CFLAGS) \$<^n^n) ping 2 pong 1
nl #?.data -F "BIN = $(BIN) %n,\nCSRC = $(CSRC) %n,.c\nDATA = $(DATA) %n\nDOC = *$(DOC) %n,.doc\n%n,.doc : %n\n\n%n, : %n,.c\n $(CC) $(CFLAGS) $<\n" > r:xx
BIN = $(BIN) basename
CSRC = $(CSRC) basename.c
DATA = $(DATA) basename.data
DOC = $(DOC) basename.doc
basename.doc : basename.data
basename : basename.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) CAR
CSRC = $(CSRC) CAR.c
DATA = $(DATA) CAR.data
DOC = $(DOC) CAR.doc
CAR.doc : CAR.data
CAR : CAR.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) CDR
CSRC = $(CSRC) CDR.c
DATA = $(DATA) CDR.data
DOC = $(DOC) CDR.doc
CDR.doc : CDR.data
CDR : CDR.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Close
CSRC = $(CSRC) Close.c
DATA = $(DATA) Close.data
DOC = $(DOC) Close.doc
Close.doc : Close.data
Close : Close.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Examine
CSRC = $(CSRC) Examine.c
DATA = $(DATA) Examine.data
DOC = $(DOC) Examine.doc
Examine.doc : Examine.data
Examine : Examine.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Exists
CSRC = $(CSRC) Exists.c
DATA = $(DATA) Exists.data
DOC = $(DOC) Exists.doc
Exists.doc : Exists.data
Exists : Exists.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) ExpandArgs
CSRC = $(CSRC) ExpandArgs.c
DATA = $(DATA) ExpandArgs.data
DOC = $(DOC) ExpandArgs.doc
ExpandArgs.doc : ExpandArgs.data
ExpandArgs : ExpandArgs.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) FilePart
CSRC = $(CSRC) FilePart.c
DATA = $(DATA) FilePart.data
DOC = $(DOC) FilePart.doc
FilePart.doc : FilePart.data
FilePart : FilePart.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) GetWord
CSRC = $(CSRC) GetWord.c
DATA = $(DATA) GetWord.data
DOC = $(DOC) GetWord.doc
GetWord.doc : GetWord.data
GetWord : GetWord.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Open
CSRC = $(CSRC) Open.c
DATA = $(DATA) Open.data
DOC = $(DOC) Open.doc
Open.doc : Open.data
Open : Open.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) PathPart
CSRC = $(CSRC) PathPart.c
DATA = $(DATA) PathPart.data
DOC = $(DOC) PathPart.doc
PathPart.doc : PathPart.data
PathPart : PathPart.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) ReadLn
CSRC = $(CSRC) ReadLn.c
DATA = $(DATA) ReadLn.data
DOC = $(DOC) ReadLn.doc
ReadLn.doc : ReadLn.data
ReadLn : ReadLn.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) ScriptName
CSRC = $(CSRC) ScriptName.c
DATA = $(DATA) ScriptName.data
DOC = $(DOC) ScriptName.doc
ScriptName.doc : ScriptName.data
ScriptName : ScriptName.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) SetOwner
CSRC = $(CSRC) SetOwner.c
DATA = $(DATA) SetOwner.data
DOC = $(DOC) SetOwner.doc
SetOwner.doc : SetOwner.data
SetOwner : SetOwner.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) SRun
CSRC = $(CSRC) SRun.c
DATA = $(DATA) SRun.data
DOC = $(DOC) SRun.doc
SRun.doc : SRun.data
SRun : SRun.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) SRunSX
CSRC = $(CSRC) SRunSX.c
DATA = $(DATA) SRunSX.data
DOC = $(DOC) SRunSX.doc
SRunSX.doc : SRunSX.data
SRunSX : SRunSX.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Suffix
CSRC = $(CSRC) Suffix.c
DATA = $(DATA) Suffix.data
DOC = $(DOC) Suffix.doc
Suffix.doc : Suffix.data
Suffix : Suffix.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Tackon
CSRC = $(CSRC) Tackon.c
DATA = $(DATA) Tackon.data
DOC = $(DOC) Tackon.doc
Tackon.doc : Tackon.data
Tackon : Tackon.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Touch
CSRC = $(CSRC) Touch.c
DATA = $(DATA) Touch.data
DOC = $(DOC) Touch.doc
Touch.doc : Touch.data
Touch : Touch.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) VolName
CSRC = $(CSRC) VolName.c
DATA = $(DATA) VolName.data
DOC = $(DOC) VolName.doc
VolName.doc : VolName.data
VolName : VolName.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) WB_Delete
CSRC = $(CSRC) WB_Delete.c
DATA = $(DATA) WB_Delete.data
DOC = $(DOC) WB_Delete.doc
WB_Delete.doc : WB_Delete.data
WB_Delete : WB_Delete.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) wb_Update
CSRC = $(CSRC) wb_Update.c
DATA = $(DATA) wb_Update.data
DOC = $(DOC) wb_Update.doc
wb_Update.doc : wb_Update.data
wb_Update : wb_Update.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Window
CSRC = $(CSRC) Window.c
DATA = $(DATA) Window.data
DOC = $(DOC) Window.doc
Window.doc : Window.data
Window : Window.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) WriteLn
CSRC = $(CSRC) WriteLn.c
DATA = $(DATA) WriteLn.data
DOC = $(DOC) WriteLn.doc
WriteLn.doc : WriteLn.data
WriteLn : WriteLn.c
$(CC) $(CFLAGS) $<
BIN = $(BIN) Yes
CSRC = $(CSRC) Yes.c
DATA = $(DATA) Yes.data
DOC = $(DOC) Yes.doc
Yes.doc : Yes.data
Yes : Yes.c
$(CC) $(CFLAGS) $<
########################################################
#
# we must add this dependency at the end of the
# file, since the variables used in it are created
# step by step.
#
bin : $(BIN)
doc : $(DOC)
csrc : $(CSRC)
alldocsnsrcs :
//Parser -inittext TPLTER -in `expandargs \#?.data` -tplt gen.sasc.tplt -tplt gen.doc.tplt
clean :
@-delete $(TEMP)
erase : clean
@-delete $(BIN) $(DOC)
install : bin
@-copy $(BIN) $(DESTDIR)
Distribution.lha : bin
@-Execute <<
set echo on
Delete Distribuition.lha
cd //
lha -x -a a Distribution.lha $(ARCDIR)Data/~(\#?.c) $(ARCDIR).\#? $(ARCDIR)Parser
cd $(ARCDIR)Data
Rename //Distribution.lha ""
<
########################################################
#
# How to create 'C' Source from a .data file
#
.data.c :
#-delete $*.c
//Parser -inittext TPLTER -tplt gen.sasc.Tplt $*.data
#rename gen.c $*.c
.data.doc :
#-delete $*.doc
//Parser -inittext TPLTER -tplt gen.doc.Tplt $*.data
#rename gen.doc $*.doc